package com.wsm.springBoot.controller;

import com.wsm.springBoot.annotation.LogAnnotation;
import com.wsm.springBoot.utils.RandomValidateCodeUtil;
import com.wsm.springBoot.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.awt.image.BufferedImage;
import java.util.Map;

/**
 * @name: DemoController
 * @Author: wangshimin
 * @Date: 2020/1/20  9:55
 * @Description:
 */
@Api(tags = {"测试地址"})
@Controller
public class DemoController {


    @ResponseBody
    @LogAnnotation
    @ApiOperation(value = "测试方法")
    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public Result demoTest() {
        return Result.success();
    }

    @LogAnnotation
    @ApiOperation(value = "登录界面")
    @RequestMapping(value = "/", method = RequestMethod.GET)
    public String index() {
        return "login";
    }


    @RequestMapping("/index")
    public String toIndex() {
        return "index_v1";
    }

    @RequestMapping("/main")
    public String main() {
        return "main";
    }
}
